<!DOCTYPE html>
<html lang="en" dir="ltr">

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  <title>医疗记录修改</title>
  <link rel="icon" href="favicon.ico" type="image/x-icon">
  <link href="/static/css/reset.css" rel="stylesheet">
  <!-- Bootstrap3.3.5 CSS -->
  <link href="/static/css/bootstrap.min.css" rel="stylesheet">
  <link rel="stylesheet" href="/static/css/query.css">
  <script>
    function loadXMLDoc()
    {
      var xmlhttp;
      if (window.XMLHttpRequest)
      {
        xmlhttp=new XMLHttpRequest();
      }
      else
      {
        xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
      xmlhttp.onreadystatechange=function()
      {
        if (xmlhttp.readyState==4 && xmlhttp.status==200)
        {
          var updateResult = document.getElementById("updateResult").value;
            if(updateResult){
            alert(updateResult)
            document.getElementById("registerResult").value =null
          }
        }
      }
      xmlhttp.open("GET","updateMed",true);
      xmlhttp.send();
    }
  </script>
</head>

<body>
<div class="container">
  <h2>医疗记录查看与修改</h2>
  <div class="query">
    <style type="text/css">
      .query {
        width:801px;
        border-radius: 10px;
        background: #f6f6f6;
        padding: 50px;
        display: flex;
        justify-content: space-between;
        text-align: center;
        margin: auto;
      }
    </style>

    <div >
      <form action="/updateMed" method="post" name="updateMedicalForm">
        <input id="updateResult" name="updateResult" type="hidden" value="{{.Msg}}">
        <p>
          <span style="font-size: 26px">要修改的病例号 casenumber： </span>
          <span style="font-size: 26px;color: #20b2aa">{{.CurNumber}}</span>
        </p>
        <p>
        </p>
        <p>
          <span style="text-decoration:none;color:#3C3A3A;font-size: 20px">以下为病例信息 </span>
        </p>
        <p>
        <div class="ax_default text_field">
          <span style="text-decoration:none;color:#3C3A3A;">药品分组</span>
          <span style="text-decoration:none;">： </span>
          <input value="{{.Case.Groups}}"  placeholder="空" type="text" name="group" class="input_text" tabindex="1" style="background: white;width: 200px;"/>
          <span style="text-decoration:none;color:#3C3A3A;">&emsp;医疗编号</span>
          <span style="text-decoration:none;">： </span>
          <input value="{{.Case.SubjectMark}}" placeholder="空" disabled readonly type="text" class="input_text" tabindex="1" style="background: white;width: 200px;color: #8F949A"/>
        </div>
        </p>
        </p>
        <p>
        <div class="disabled">
          <span style="text-decoration:none;color:#3C3A3A;">研究人员</span>
          <span style="text-decoration:none;">： </span>
          <input value="{{.Case.Researcher}}" placeholder="空" disabled readonly type="text" class="input_text" tabindex="1" style="background: white;width: 200px;color: #8F949A"/>
          <span style="text-decoration:none;color:#3C3A3A;">&emsp;所处机构</span>
          <span style="text-decoration:none;">： </span>
          <input value="{{.Case.Organization}}" placeholder="空" disabled readonly type="text" class="input_text" tabindex="1" style="background: white;width: 200px;color: #8F949A"/>
        </div>
        </p>

        <p>
        <div >
          <span style="text-decoration:none;color:#3C3A3A;">疾病类型</span>
          <span style="text-decoration:none;">： </span>
          <input value="{{.Case.Diseases}}" placeholder="空" type="text" name="disease" class="input_text" tabindex="1" style="background: white;width: 500px"/>
        </div>
        </p>
        <p>
        <div >
          <span style="text-decoration:none;color:#3C3A3A;">诊断信息</span>
          <span style="text-decoration:none;">： </span>
          <input value="{{.Case.Diagnose}}"  placeholder="空" type="text" name="diagnose" class="input_text" tabindex="1" style="background: white;width: 500px"/>
        </div>
        </p>
        <p>
        </p>

        <p>
          <span style="text-decoration:none;color:#3C3A3A;font-size: 20px">以下为共享信息 </span>
        </p>
        <p>
        <div class="disabled">
          <span style="text-decoration:none;color:#3C3A3A;">共享数据DOA</span>
          <span style="text-decoration:none;">： </span>
          <input value="{{.Case.Addition1}}" placeholder="空" disabled readonly type="text" class="input_text" tabindex="1" style="background: white;width: 470px;color: #8F949A"/>
        </div>
        </p>
        <p>
        <div class="disabled">
          <span style="text-decoration:none;color:#3C3A3A;">共享密码</span>
          <span style="text-decoration:none;">： </span>
          <input value="{{.Case.Addition2}}" placeholder="空" disabled readonly type="text" class="input_text" tabindex="1" style="background: white;width: 200px;color: #8F949A"/>
          <span style="text-decoration:none;color:#3C3A3A;">&emsp;共享时限</span>
          <span style="text-decoration:none;">： </span>
          <input value="{{.Case.GatherTime}}" placeholder="空" disabled readonly type="text" class="input_text" tabindex="1" style="background: white;width: 200px;color: #8F949A"/>
        </div>
        </p>
        <p>
        </p>
        <p>
          <span style="text-decoration:none;color:#3C3A3A;font-size: 20px">以下为病人信息 </span>
        </p>
        <p>
        <div class="disabled">
          <span style="text-decoration:none;color:#3C3A3A;">病人姓名</span>
          <span style="text-decoration:none;">： </span>
          <input value="{{.Case.Name}}" placeholder="空" disabled readonly type="text" class="input_text" tabindex="1" style="background: white;width: 200px;color: #8F949A"/>
          <span style="text-decoration:none;color:#3C3A3A;">&emsp;姓名简写</span>
          <span style="text-decoration:none;">： </span>
          <input value="{{.Case.NameInitials}}" placeholder="空" disabled readonly type="text" class="input_text" tabindex="1" style="background: white;width: 200px;color: #8F949A"/>
        </div>
        </p>
        <p>
        <div class="disabled">
          <span style="text-decoration:none;color:#3C3A3A;">病人性别</span>
          <span style="text-decoration:none;">： </span>
          <input value="{{.Case.Sex}}" placeholder="空" disabled readonly type="text" class="input_text" tabindex="1" style="background: white;width: 200px;color: #8F949A"/>
          <span style="text-decoration:none;color:#3C3A3A;">&emsp;病人年龄</span>
          <span style="text-decoration:none;">： </span>
          <input value="" placeholder="空" disabled readonly type="text" class="input_text" tabindex="1" style="background: white;width: 200px;color: #8F949A"/>
        </div>
        </p>
        <p>
        <div class="disabled">
          <span style="text-decoration:none;color:#3C3A3A;">病人民族</span>
          <span style="text-decoration:none;">： </span>
          <input value="{{.Case.Nation}}" placeholder="空" disabled readonly type="text" class="input_text" tabindex="1" style="background: white;width: 200px;color: #8F949A"/>
          <span style="text-decoration:none;color:#3C3A3A;">&emsp;病人籍贯</span>
          <span style="text-decoration:none;">： </span>
          <input value="{{.Case.NativePlace}}" placeholder="空" disabled readonly type="text" class="input_text" tabindex="1" style="background: white;width: 200px;color: #8F949A"/>
        </div>
        </p>
        <p>
        </p>
        <p>
          <span style="text-decoration:none;color:#3C3A3A;font-size: 20px">以下为录入信息 </span>
        </p>

        <p>
        <div class="disabled">
          <span style="text-decoration:none;color:#3C3A3A;">录入时间</span>
          <span style="text-decoration:none;">： </span>
          <input value="{{.Case.EntryTime}}" placeholder="空" disabled readonly type="text" class="input_text" tabindex="1" style="background: white;width: 200px;color: #8F949A"/>
          <span style="text-decoration:none;color:#3C3A3A;">&emsp;基准时间</span>
          <span style="text-decoration:none;">： </span>
          <input value="{{.Case.BaseTime}}" placeholder="空" disabled readonly type="text" class="input_text" tabindex="1" style="background: white;width: 200px;color: #8F949A"/>
        </div>
        </p>
        <p>
        <div class="disabled">
          <span style="text-decoration:none;color:#3C3A3A;">状态信息</span>
          <span style="text-decoration:none;">： </span>
          <input value="{{.Case.Status}}" placeholder="空" disabled readonly type="text" class="input_text" tabindex="1" style="background: white;width: 200px;color: #8F949A"/>
          <span style="text-decoration:none;color:#3C3A3A;">&emsp;其他信息</span>
          <span style="text-decoration:none;">： </span>
          <input value="{{.Case.Addition3}}" placeholder="空" disabled readonly type="text" class="input_text" tabindex="1" style="background: white;width: 200px;color: #8F949A"/>
        </div>
        </p>

        <p>
        </p>
        <p>
        </p>
        <p>
        </p>
        <p>
          <button type="submit" name="button"  class="btn" style="color:white">修改医疗记录</button>
          <style type="text/css">
            .btn {
              border-width:0px;
              text-align: center;
              width:200px;
              height:36px;
              background:inherit;
              background-color:rgba(22, 155, 213, 1);
              border:none;
              border-radius:6px;
              -moz-box-shadow:none;
              -webkit-box-shadow:none;
              box-shadow:none;
              font-family:'方正楷体简体';
              font-weight:400;
              font-style:normal;
              font-size:22px;
            }
          </style>
        </p>
        <a href="/home">返回首页&emsp;&emsp;</a>
        <a href="/医疗数据管理">&emsp;&emsp;返回上一级</a>
      </form>
    </div>
  </div>
  <!-- data-backdrop="false"去除遮罩层  -->
<!--  <div class="modal fade bd-example-modal-sm" id="myModal" role="dialog" data-backdrop="false" aria-hidden="true">-->
<!--    <div class="modal-dialog modal-sm">-->
<!--      <div class="modal-content">-->
<!--        <p class="text-center mb-0" style="height:42px;line-height:42px;margin:0;">-->
<!--          <i class="fa fa-check-circle text-success mr-1" aria-hidden="true"></i>-->
<!--          请输入要修改的医疗记录信息-->
<!--        </p>-->
<!--      </div>-->
<!--    </div>-->
<!--  </div>-->
</div>
</body>
<script type="text/javascript" src="/static/js/jquery.min.js"></script>
<script type="text/javascript" src="/static/js/bootstrap.min.js"></script>
<script type="text/javascript">
  $(function () {
    $(".btn").on('click', function () {
      alert("确认提交修改？")
      loadXMLDoc()
    });
    //
    // var inputs = $('input[type="text"]');
    // // 提交按钮
    // $('.btn').click(function () {
    //   // 如果为空 报错提示
    //   for (var i = 0; i < inputs.length; i++) {
    //     if (!($(inputs[i]).val())) {
    //       $(inputs[i]).addClass('redColor');
    //       $('#myModal').modal('show');
    //       setTimeout(function () {
    //         $("#myModal").modal("hide");
    //       }, 2000);
    //       return;
    //     }
    //   }
    //
    //   // 成功后提交数据
    //
    //   $("form[name='updateMedicalForm']").submit()
    // })
  })
</script>

</html>